import 'package:flutter/material.dart';
import 'package:flutter_magic_planet/common/constant.dart';
import 'package:get/get.dart';

class BottomNavigation extends StatelessWidget {
  final double iconSize;
  final Function()? leftIconTap;
  final Function()? rightIconTap;

  const BottomNavigation(
      {Key? key, this.leftIconTap, this.rightIconTap, this.iconSize = 37})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: navigationBarHeight,
      padding: EdgeInsets.symmetric(horizontal: paddingHorizontal),
      decoration: BoxDecoration(
        color: Colors.white,
        boxShadow: [
          BoxShadow(
            color: Color.fromRGBO(0, 0, 0, 0),
            spreadRadius: 1,
            blurRadius: 12,
          ),
        ],
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          GestureDetector(
            onTap: leftIconTap,
            child: Icon(
              Icons.account_circle,
              size: iconSize,
              color: primaryColor,
            ),
          ),
          Text(
            '首页'.tr,
            style: TextStyle(
              color: Colors.black87,
              fontWeight: FontWeight.bold,
              fontSize: 17,
            ),
          ),
          GestureDetector(
            onTap: rightIconTap,
            child: Icon(
              Icons.add_circle,
              size: iconSize,
              color: primaryColor,
            ),
          ),
        ],
      ),
    );
  }
}
